package com.majorty.mb.controller.response;

/**
 * 通用的响应结果数据封装
 * @author zhangshuai
 * @date 2019-09-24 22:57
 */
public class ResponseResult<T> extends BaseResponse {

    private T result;

    private ResponseResult() {}

    private ResponseResult(CodeEnum code, T result) {
        super(code);
        this.result = result;
    }

    public static <T> ResponseResult<T> out(CodeEnum code, T result) {
        return new ResponseResult<T>(code, result);
    }

    public T getResult() {
        return result;
    }

    public void setResult(T result) {
        this.result = result;
    }
}